# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         demo01
# Description:   raise异常
# Author:       ASUS
# Date:         2019/3/20
#-------------------------------------------------------------------------------


a = 1
b = 10

if b==10:
    #主动抛出异常
    raise Exception('a不能与10相加')          #在这里程序终止运行
else:
    a = a+b
    print(a)
print('-----------')



